package cn.south.campus.business.model.enums;

/**
 * <p>
 *
 * </p>
 *
 * @author chow
 * @since 2024/11/14 13:39
 */
public interface WalletEnums {
    enum WalletMoneyEnums implements WalletEnums {
        ONE(100),
        TWO(200),
        THREE(300),
        FOUR(400),
        FIVE(500);
        private final int money;

        WalletMoneyEnums(int i) {
            this.money = i;
        }

        public int getMoney() {
            return money;
        }

        public static WalletMoneyEnums getMoneyEnum(int money) {
            for (WalletMoneyEnums walletMoneyEnums : WalletMoneyEnums.values()) {
                if (walletMoneyEnums.getMoney() == money) {
                    return walletMoneyEnums;
                }
            }
            return null;
        }
    }

    enum WalletTypeEnums implements WalletEnums {
        RECHARGE(1, "充值"),
        PAY(2, "支付"),
        WITHDRAW(3, "提现"),
        INCOME(4, "收入"),
        REFUND(5, "退款");
        private final int type;
        private final String desc;

        WalletTypeEnums(int i, String desc) {
            this.type = i;
            this.desc = desc;
        }

        public int getType() {
            return type;
        }

        public String getDesc() {
            return desc;
        }
    }

    enum WalletLogStatusEnums implements WalletEnums {
        // 审核中，已到账，代入账
        PENDING(0, "审核中"),
        RECEIVED(1, "已到账"),
        RECEIVING(2, "代入账"),
        WITHDRAWED(3, "已提现"),
        PAYED(4, "已支付"),;
        private final int code;
        private final String desc;

        WalletLogStatusEnums(int code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public int getCode() {
            return code;
        }

        public String getDesc() {
            return desc;
        }
    }

    enum WithdrawalAuditEnums implements WalletEnums {
        PENDING(0, "待审核"),
        PASS(1, "通过"),
        REJECT(2, "拒绝"),
        ;
        private final int code;
        private final String desc;

        WithdrawalAuditEnums(int code, String desc) {
            this.code = code;
            this.desc = desc;
        }

        public int getCode() {
            return code;
        }

        public String getDesc() {
            return desc;
        }
    }
}
